Skip to content

Comments

fix(parser): include per-field locations for safe-output schema failures#17484

Closed
davidahmann wants to merge 1 commit intogithub:mainfrom
davidahmann:codex/issue-17480-safe-outputs-locations
Closed

fix(parser): include per-field locations for safe-output schema failures#17484
davidahmann wants to merge 1 commit intogithub:mainfrom
davidahmann:codex/issue-17480-safe-outputs-locations

Conversation

@davidahmann
Copy link
Contributor

@davidahmann davidahmann commented Feb 21, 2026

Problem

Invalid safe-outputs configs can fail schema validation without surfacing all failing fields with their source locations, which slows operator debugging and can lead to repeated edit/compile cycles.

Why now

Gap item #4 tracks this as actionable operator friction in parser diagnostics, and current behavior does not consistently provide location-rich details for every schema failure.

What changed

  • Updated validateWithSchemaAndLocation to aggregate all schema failures and render each with JSON path plus line/column where available.
  • Added formatSchemaFailureDetail(...) helper for consistent path/location formatting.
  • Added regression test coverage asserting multiple safe-output failures are all reported with location details.

Validation

  • go test ./pkg/parser -run 'TestValidateWithSchemaAndLocationReportsAllSafeOutputFailures|TestSafeOutputsErrorLocationAtVariousDepths|TestSafeOutputsErrorLocationWithComplexYAML|TestSafeOutputsEdgeCases'
  • make agent-finish ❌ blocked by existing baseline failures in pkg/workflow golden/git-patch tests.
  • Baseline check on origin/main: go test ./pkg/workflow -short shows same failures (TestGitPatchFromHEADCommits, TestGitPatchPrefersBranchOverHEAD, TestGitPatchNoCommits, TestWasmGolden_CompileFixtures).

Refs #17480



✨ PR Review Safe Output Test - Run 22256990263

💥 [THE END] — Illustrated by Smoke Claude

@pelikhan
Copy link
Contributor

@copilot merge main and recompile

@github-actions
Copy link
Contributor

Hey @davidahmann 👋 — thanks for your interest in GitHub Agentic Workflows!

Unfortunately, this PR cannot be accepted because it violates the project's core contribution policy:

🚫 Traditional pull requests are not enabled for this repository.

From CONTRIBUTING.md:

Traditional Pull Requests Are Not Enabled: You cannot create pull requests directly. Instead, you create detailed agentic plans in issues, and GitHub Copilot Agent will create and implement the PR for you after maintainer approval.

The repository uses an agentic development workflow exclusively — all contributions must go through GitHub Copilot Agent. This means:

  1. ✅ Contributors create issues with detailed agentic plans
  2. ✅ Maintainers review and assign issues to Copilot Agent
  3. The agent creates the PR and implements the plan
  4. ❌ Direct PRs from contributors are not accepted

What to do instead

I can see you've already opened issue #17480 which describes the problem perfectly! That's exactly the right approach. Here's what should happen next:

  1. Close this PR — it bypasses the required workflow
  2. Enhance issue parser: add field-level locations for safe-outputs schema failures #17480 with a complete agentic implementation plan (if not already detailed enough)
  3. Wait for maintainer approval — a maintainer will assign the issue to Copilot Agent
  4. Agent creates the PR — Copilot Agent will implement your plan in a new PR

The work you've done here is solid (focused changes, includes tests, references the issue), but the process matters for this project — it's dogfooding agentic workflows to build agentic workflows.

Thanks for understanding, and apologies for any confusion! The CONTRIBUTING.md file explains this workflow in detail.

Generated by Contribution Check

@pelikhan
Copy link
Contributor

See #17524

@pelikhan pelikhan closed this Feb 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants